﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace EventPlanner.Models
{
    public class Participante
    {
        public string Nombre { get; set; }

        [Key]
        [Required(ErrorMessage="El mail es obligatorio ")]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"^[a-z0-9](([_\.\-]?[a-z0-9]+)*)@([a-z0-9]+)(([\.\-]?[a-z0-9]+)*)\.([a-z]{2,})$",
        ErrorMessage = "Email no válido")]
        [Display(Name = "Correo electrónico")]
        public string Email { get; set; }

        public virtual ICollection<Evento> Eventos { get; set; }
    }
}